package com.zhang.mapper;

import com.zhang.entity.ModelDictionary;
import com.zhang.entity.UserInfo;
import com.zhang.entity.vo.QueryUserBody;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * User: 张
 * Date: 2024-10-31
 * Time: 10:52
 * Description:
 */
@Mapper
public interface UserMapper {

    public List<UserInfo> queryUser(@Param("userName") String userName,
                                    @Param("phone") String phone ,
                                    @Param("email") String email ,
                                    @Param("userState") Integer userState);
    @Update("update visions_sort.user_info set user_state = #{userState} where id = #{userId}")
    public int updateUserState(@Param("userId") Integer userId ,
                               @Param("userState")Integer userState);

    public int updateUser(@Param("userId") Integer userId,
                          @Param("userName") String userName,
                          @Param("phone") String phone ,
                          @Param("imageId") Integer imageId,
                          @Param("email") String email);
    @Select("select * from visions_sort.user_info where id = #{userId};")
    public List<UserInfo> queryUserById(@Param("userId") Integer userId);


}
